import 'package:get/get.dart';

/// image_widget_controller.dart
///
/// Created by fuchuanwei on Tue Feb 21 2023.
///
/// Description: 图片组件Controller
///
class ImageWidgetController extends GetxController {
  var selectedShapeOption = 0.obs;

  var isCircle = false.obs;

  var selectedStateOption = 0.obs;

  var imageUrl = "https://w.wallhaven.cc/full/yx/wallhaven-yxx3kd.png".obs;

  ///切换Selected Shape Option
  changeSelectedShapeOption(int value) => {
        selectedShapeOption.value = value,
        isCircle.value = selectedShapeOption.value == 0 ? false : true
      };
  changeSelectedStateOption(int value) => {
        selectedStateOption.value = value,
        imageUrl.value = selectedStateOption.value == 0
            ? "https://w.wallhaven.cc/full/yx/wallhaven-yxx3kd.png"
            : "https://gtd.alicdn.com/"
      };
}
